//
//  ModifyPayPasswordViewController.m
//  quxiangtao
//
//  Created by xbmios on 2018/7/13.
//  Copyright © 2018年 shanhaijin. All rights reserved.
//

#import "ModifyPayPasswordViewController.h"

@interface ModifyPayPasswordViewController ()

@property (strong, nonatomic) UIView *oldPayPasswordView;
@property (strong, nonatomic) UILabel *oldPayPasswordL;
@property (strong, nonatomic) UITextField *oldPayPasswordTextField;
@property (strong, nonatomic) UIView *line1;

@property (strong, nonatomic) UIView *phoneNumView;
@property (strong, nonatomic) UILabel *phoneL;
@property (strong, nonatomic) UILabel *phoneNumL;
@property (strong, nonatomic) UIView *line2;

@property (strong, nonatomic) UIView *codeView;
@property (strong, nonatomic) UILabel *codeL;
@property (strong, nonatomic) UITextField *codeTextField;
@property (strong, nonatomic) UIButton *getCodeBtn;
@property (strong, nonatomic) UIView *line3;

@property (strong, nonatomic) UIView *nPayPasswordView;
@property (strong, nonatomic) UILabel *nPayPasswordL;
@property (strong, nonatomic) UITextField *nPayPasswordTextField;
@property (strong, nonatomic) UIView *line4;

@property (strong, nonatomic) UIView *cNewPayPasswordView;
@property (strong, nonatomic) UILabel *cNewPayPasswordL;
@property (strong, nonatomic) UITextField *cNewPayPasswordTextField;
@property (strong, nonatomic) UIView *line5;

@property (strong, nonatomic) UIImageView *submitIV;
@property (strong, nonatomic) UILabel *submitL;

@end

@implementation ModifyPayPasswordViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = WhiteColor;
    self.title = @"修改支付密码";
    
    [self createUI];
    
}


#pragma mark -获取验证码
- (void)getCodeBtnClick:(UIButton *)btn {
    
    NSLog(@"获取验证码");
    
    [[CommonAction sharedInstance] getCodeWithPhone:self.phoneNumL.text type:@"paypassword" andSender:btn phoneCodeBlock:^(NSString *codeStr) {
        
        NSLog(@"修改支付密码验证码:%@", codeStr);
        
    }];
    
}

#pragma mark -提交
- (void)submitGesture:(UIGestureRecognizer *)recognizer {
    
    NSLog(@"提交");
    
    if (self.oldPayPasswordTextField.text.length <= 0) {
        
        [[KYAlertView sharedInstance] showAlertViewWithMessage:@"请输入支付密码"];
        return;
        
    }
    
    if (self.codeTextField.text.length <= 0) {
        
        [[KYAlertView sharedInstance] showAlertViewWithMessage:@"请输入验证码"];
        return ;
    }
    
    if (self.nPayPasswordTextField.text.length <= 0) {
        
        [[KYAlertView sharedInstance] showAlertViewWithMessage:@"请输入新的支付密码"];
        
        return ;
    }
    
    if (self.cNewPayPasswordTextField.text.length <= 0) {
        
        [[KYAlertView sharedInstance] showAlertViewWithMessage:@"请输入r新的支付密码"];
        return ;
    }
    
    NSString *nPassword = [RSA encryptString:[self.nPayPasswordTextField.text md5String] publicKey:PublicKey];
    NSString *cPassword = [RSA encryptString:[self.cNewPayPasswordTextField.text md5String] publicKey:PublicKey];
    
    NSString *par = [NSString stringWithFormat:@"{\"user_id\" : \"%@\", \"user_mobile\" : \"%@\", \"code\" : \"%@\", \"newpaypassword\" : \"%@\", \"renewpaypassword\" : \"%@\"}",  [RSA encryptString:[CommonUserInfo sharedInstance].user_id publicKey:PublicKey], [RSA encryptString:[CommonUserInfo sharedInstance].phone publicKey:PublicKey], [RSA encryptString:self.codeTextField.text publicKey:PublicKey], nPassword, cPassword];
    
    [PPNetworkHelper POST:@"user/Password/Updatepaypassword" parameters:@{@"json" : par} success:^(id responseObject) {
        
        NSLog(@"修改支付密码:%@",responseObject);
        
        if ([responseObject[@"code"] integerValue] == 1) {
            
//            [[KYAlertView sharedInstance] showAlertViewWithMessage:@"密码修改成功"];
             [[KYAlertView sharedInstance] showAlertViewWithMessage:responseObject[@"msg"]];
            [self.navigationController popViewControllerAnimated:YES];
    
        }else {
            
            [[KYAlertView sharedInstance] showAlertViewWithMessage:responseObject[@"msg"]];
        
        }
        
    } failure:^(NSError *error) {
        
        if (error) {
            
            [[KYAlertView sharedInstance] showAlertViewWithMessage:Tip];
        }
    }];
    
}

- (void)createUI {
    
    [self.view addSubview:self.oldPayPasswordView];
    [self.oldPayPasswordView addSubview:self.oldPayPasswordL];
    [self.oldPayPasswordView addSubview:self.oldPayPasswordTextField];
    [self.oldPayPasswordView addSubview:self.line1];
    
    [self.view addSubview:self.phoneNumView];
    [self.phoneNumView addSubview:self.phoneL];
    [self.phoneNumView addSubview:self.phoneNumL];
    [self.phoneNumView addSubview:self.line2];
    
    [self.view addSubview:self.codeView];
    [self.codeView addSubview:self.codeL];
    [self.codeView addSubview:self.codeTextField];
    [self.codeView addSubview:self.getCodeBtn];
    [self.codeView addSubview:self.line3];
    
    [self.view addSubview:self.nPayPasswordView];
    [self.nPayPasswordView addSubview:self.nPayPasswordL];
    [self.nPayPasswordView addSubview:self.nPayPasswordTextField];
    [self.nPayPasswordView addSubview:self.line4];
    
    [self.view addSubview:self.cNewPayPasswordView];
    [self.cNewPayPasswordView addSubview:self.cNewPayPasswordL];
    [self.cNewPayPasswordView addSubview:self.cNewPayPasswordTextField];
    [self.cNewPayPasswordView addSubview:self.line5];
    
    [self.view addSubview:self.submitIV];
    [self.view addSubview:self.submitL];
    
    __weak typeof(self) weakSelf = self;
    [self.oldPayPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.view.mas_left);
        make.right.mas_equalTo(weakSelf.view.mas_right);
        make.top.mas_equalTo(weakSelf.view.mas_top);
        make.height.mas_equalTo(jisuan(92));
        
    }];
    [self.oldPayPasswordL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordView.mas_left).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.oldPayPasswordView.mas_centerY);
        
        make.width.mas_equalTo(jisuan(176));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.oldPayPasswordTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordL.mas_right).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.oldPayPasswordView.mas_centerY);
        make.right.mas_equalTo(weakSelf.oldPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.line1 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordView.mas_left).with.offset(jisuan(40));
        make.right.mas_equalTo(weakSelf.oldPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.bottom.mas_equalTo(weakSelf.oldPayPasswordView.mas_bottom);
        make.height.mas_equalTo(jisuan(2));
    }];
    
    
    [self.phoneNumView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.view.mas_left);
        make.right.mas_equalTo(weakSelf.view.mas_right);
        make.top.mas_equalTo(weakSelf.oldPayPasswordView.mas_bottom);
        make.height.mas_equalTo(jisuan(92));
        
    }];
    [self.phoneL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.phoneNumView.mas_left).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.phoneNumView.mas_centerY);
        
        make.width.mas_equalTo(jisuan(80));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.phoneNumL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordTextField.mas_left);
        make.centerY.mas_equalTo(weakSelf.phoneNumView.mas_centerY);
        make.right.mas_equalTo(weakSelf.phoneNumView.mas_right).with.offset(-jisuan(40));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.line2 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.phoneNumView.mas_left).with.offset(jisuan(40));
        make.right.mas_equalTo(weakSelf.phoneNumView.mas_right).with.offset(-jisuan(40));
        make.bottom.mas_equalTo(weakSelf.phoneNumView.mas_bottom);
        make.height.mas_equalTo(jisuan(2));
    }];
    
    
    [self.codeView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.view.mas_left);
        make.right.mas_equalTo(weakSelf.view.mas_right);
        make.top.mas_equalTo(weakSelf.phoneNumView.mas_bottom);
        make.height.mas_equalTo(jisuan(92));
        
    }];
    [self.codeL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.codeView.mas_left).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.codeView.mas_centerY);
        
        make.width.mas_equalTo(jisuan(130));
        make.height.mas_equalTo(jisuan(34));
    }];
    
    [self.getCodeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(weakSelf.codeView.mas_right).with.offset(-jisuan(60));
        make.centerY.mas_equalTo(weakSelf.codeView.mas_centerY);
        make.width.mas_equalTo(jisuan(130));
        make.height.mas_equalTo(jisuan(34));
        
    }];
    [self.codeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordTextField.mas_left);
        make.centerY.mas_equalTo(weakSelf.codeView.mas_centerY);
        make.right.mas_equalTo(weakSelf.getCodeBtn.mas_left).with.offset(-jisuan(40));
        make.height.mas_equalTo(jisuan(34));
        
    }];
    
    [self.line3 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.codeView.mas_left).with.offset(jisuan(40));
        make.right.mas_equalTo(weakSelf.codeView.mas_right).with.offset(-jisuan(40));
        make.bottom.mas_equalTo(weakSelf.codeView.mas_bottom);
        make.height.mas_equalTo(jisuan(2));
    }];
    
    
    [self.nPayPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.view.mas_left);
        make.right.mas_equalTo(weakSelf.view.mas_right);
        make.top.mas_equalTo(weakSelf.codeView.mas_bottom);
        make.height.mas_equalTo(jisuan(92));
        
    }];
    [self.nPayPasswordL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.nPayPasswordView.mas_left).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.nPayPasswordView.mas_centerY);
        
        make.width.mas_equalTo(jisuan(178));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.nPayPasswordTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordTextField.mas_left);
        make.centerY.mas_equalTo(weakSelf.nPayPasswordView.mas_centerY);
        make.right.mas_equalTo(weakSelf.nPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.line4 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.nPayPasswordView.mas_left).with.offset(jisuan(40));
        make.right.mas_equalTo(weakSelf.nPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.bottom.mas_equalTo(weakSelf.nPayPasswordView.mas_bottom);
        make.height.mas_equalTo(jisuan(2));
    }];
    
    
    [self.cNewPayPasswordView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.view.mas_left);
        make.right.mas_equalTo(weakSelf.view.mas_right);
        make.top.mas_equalTo(weakSelf.nPayPasswordView.mas_bottom);
        make.height.mas_equalTo(jisuan(92));
        
    }];
    [self.cNewPayPasswordL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.cNewPayPasswordView.mas_left).with.offset(jisuan(40));
        make.centerY.mas_equalTo(weakSelf.cNewPayPasswordView.mas_centerY);
        
        make.width.mas_equalTo(jisuan(178));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.cNewPayPasswordTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.oldPayPasswordTextField.mas_left);
        make.centerY.mas_equalTo(weakSelf.cNewPayPasswordView.mas_centerY);
        make.right.mas_equalTo(weakSelf.cNewPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.height.mas_equalTo(jisuan(34));
    }];
    [self.line5 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(weakSelf.cNewPayPasswordView.mas_left).with.offset(jisuan(40));
        make.right.mas_equalTo(weakSelf.cNewPayPasswordView.mas_right).with.offset(-jisuan(40));
        make.bottom.mas_equalTo(weakSelf.cNewPayPasswordView.mas_bottom);
        make.height.mas_equalTo(jisuan(2));
        
    }];
    
    [self.submitIV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerX.mas_equalTo(weakSelf.view.mas_centerX);
        make.bottom.mas_equalTo(weakSelf.view.mas_bottom).with.offset(-jisuan(66));
        make.width.mas_equalTo(jisuan(550));
        make.height.mas_equalTo(jisuan(106));
    }];
    
    [self.submitL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.centerY.mas_equalTo(weakSelf.submitIV.mas_centerY).with.offset(-jisuan(4));
        make.centerX.mas_equalTo(weakSelf.submitIV.mas_centerX);
        
    }];
    
}


#pragma mark -lazy
- (UIView *)oldPayPasswordView {
    
    if (!_oldPayPasswordView) {
        
        _oldPayPasswordView = [[UIView alloc] init];
        
    }
    
    return _oldPayPasswordView;
    
}

- (UILabel *)oldPayPasswordL {
    
    if (!_oldPayPasswordL) {
        
        _oldPayPasswordL = [[UILabel alloc] init];
        _oldPayPasswordL.text = @"请输入支付密码";
        _oldPayPasswordL.textColor = Color333333;
        _oldPayPasswordL.font = Font(24);
        _oldPayPasswordL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _oldPayPasswordL;
}

- (UITextField *)oldPayPasswordTextField {
    
    if (!_oldPayPasswordTextField) {
        
        _oldPayPasswordTextField = [[UITextField alloc] init];
        _oldPayPasswordTextField.placeholder = @"请输入支付密码";
        _oldPayPasswordTextField.textColor = Color333333;
        _oldPayPasswordTextField.font = Font(24);
        _oldPayPasswordTextField.textAlignment = NSTextAlignmentLeft;
        _oldPayPasswordTextField.secureTextEntry = YES;
        
        _oldPayPasswordTextField.keyboardType = UIKeyboardTypeDefault;
        
    }
    
    return _oldPayPasswordTextField;
}
- (UIView *)line1 {
    
    if (!_line1) {
        
        _line1 = [[UIView alloc] init];
        _line1.backgroundColor = Colordddddd;
        
    }
    
    return _line1;
}

- (UIView *)phoneNumView {
    
    if (!_phoneNumView) {
        
        _phoneNumView = [[UIView alloc] init];
        
    }
    
    return _phoneNumView;
    
}

- (UILabel *)phoneL {
    
    if (!_phoneL) {
        
        _phoneL = [[UILabel alloc] init];
        _phoneL.text = @"手机号";
        _phoneL.textColor = Color333333;
        _phoneL.font = Font(24);
        _phoneL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _phoneL;
}

- (UILabel *)phoneNumL {
    
    if (!_phoneNumL) {
        
        _phoneNumL = [[UILabel alloc] init];
        _phoneNumL.text = [CommonUserInfo sharedInstance].phone;
        _phoneNumL.textColor = Color333333;
        _phoneNumL.font = Font(24);
        _phoneNumL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _phoneNumL;
}

- (UIView *)line2 {
    
    if (!_line2) {
        
        _line2 = [[UIView alloc] init];
        _line2.backgroundColor = Colordddddd;
        
    }
    
    return _line2;
}

- (UIView *)codeView {
    
    if (!_codeView) {
        
        _codeView = [[UIView alloc] init];
        
    }
    
    return _codeView;
    
}

- (UILabel *)codeL {
    
    if (!_codeL) {
        
        _codeL = [[UILabel alloc] init];
        _codeL.text = @"短信验证码";
        _codeL.textColor = Color333333;
        _codeL.font = Font(24);
        _codeL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _codeL;
    
}

- (UITextField *)codeTextField {
    
    if (!_codeTextField) {
        
        _codeTextField = [[UITextField alloc] init];
        _codeTextField.placeholder = @"请输入验证码";
        _codeTextField.textColor = Color333333;
        _codeTextField.font = Font(24);
        _codeTextField.textAlignment = NSTextAlignmentLeft;
        
        _codeTextField.secureTextEntry = YES;
        
        _codeTextField.keyboardType = UIKeyboardTypeDefault;
   
    }
    
    return _codeTextField;
}

- (UIButton *)getCodeBtn {
    
    if (!_getCodeBtn) {
        
        _getCodeBtn = [[UIButton alloc] init];
        [_getCodeBtn setTitle:@"获取验证码" forState:UIControlStateNormal];
        [_getCodeBtn setTitle:@"获取验证码" forState:UIControlStateSelected];
        
        [_getCodeBtn setTitleColor:Colorff4200 forState:UIControlStateNormal];
        _getCodeBtn.titleLabel.font = Font(24);
        
        [_getCodeBtn addTarget:self action:@selector(getCodeBtnClick:) forControlEvents:UIControlEventTouchUpInside];
   
    }
    
    return _getCodeBtn;
}
- (UIView *)line3 {
    
    if (!_line3) {
        
        _line3 = [[UIView alloc] init];
        _line3.backgroundColor = Colordddddd;
        
    }
    
    return _line3;
}


- (UIView *)nPayPasswordView {
    
    if (!_nPayPasswordView) {
        
        _nPayPasswordView = [[UIView alloc] init];
        
    }
    
    return _nPayPasswordView;
    
}

- (UILabel *)nPayPasswordL {
    
    if (!_nPayPasswordL) {
        
        _nPayPasswordL = [[UILabel alloc] init];
        _nPayPasswordL.text = @"设置新支付密码";
        _nPayPasswordL.textColor = Color333333;
        _nPayPasswordL.font = Font(24);
        _nPayPasswordL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _nPayPasswordL;
}

- (UITextField *)nPayPasswordTextField {
    
    
    if (!_nPayPasswordTextField) {
        
        _nPayPasswordTextField = [[UITextField alloc] init];
        _nPayPasswordTextField.placeholder = @"请输入新支付密码";
        _nPayPasswordTextField.textColor = Color333333;
        _nPayPasswordTextField.font = Font(24);
        _nPayPasswordTextField.textAlignment = NSTextAlignmentLeft;
        
        _nPayPasswordTextField.secureTextEntry = YES;
        
        _nPayPasswordTextField.keyboardType = UIKeyboardTypeDefault;
    
    }
    
    return _nPayPasswordTextField;
}

- (UIView *)line4 {
    
    if (!_line4) {
        
        _line4 = [[UIView alloc] init];
        _line4.backgroundColor = Colordddddd;
        
    }
    
    return _line4;
}

- (UIView *)cNewPayPasswordView {
    
    if (!_cNewPayPasswordView) {
        
        _cNewPayPasswordView = [[UIView alloc] init];
        
    }
    
    return _cNewPayPasswordView;
    
}

- (UILabel *)cNewPayPasswordL {
    
    if (!_cNewPayPasswordL) {
        
        _cNewPayPasswordL = [[UILabel alloc] init];
        _cNewPayPasswordL.text = @"确认新支付密码";
        _cNewPayPasswordL.textColor = Color333333;
        _cNewPayPasswordL.font = Font(24);
        _cNewPayPasswordL.textAlignment = NSTextAlignmentLeft;
        
    }
    
    return _cNewPayPasswordL;
}

- (UITextField *)cNewPayPasswordTextField {
    
    
    if (!_cNewPayPasswordTextField) {
        
        _cNewPayPasswordTextField = [[UITextField alloc] init];
        _cNewPayPasswordTextField.placeholder = @"确认新支付密码";
        _cNewPayPasswordTextField.textColor = Color333333;
        _cNewPayPasswordTextField.font = Font(24);
        _cNewPayPasswordTextField.textAlignment = NSTextAlignmentLeft;
        
        _cNewPayPasswordTextField.secureTextEntry = YES;
        
        _cNewPayPasswordTextField.keyboardType = UIKeyboardTypeDefault;
    }
    
    return _cNewPayPasswordTextField;
}

- (UIView *)line5 {
    
    if (!_line5) {
        
        _line5 = [[UIView alloc] init];
        _line5.backgroundColor = Colordddddd;
        
    }
    
    return _line5;

}

- (UIImageView *)submitIV {
    
    if (!_submitIV) {
        
        _submitIV = [[UIImageView alloc] init];
        _submitIV.contentMode = UIViewContentModeScaleAspectFit;
        _submitIV.image = [UIImage imageNamed:@"redBtnBG"];
        _submitIV.userInteractionEnabled = YES;
        
        UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(submitGesture:)];
        [_submitIV addGestureRecognizer:gesture];
        
    }
    
    return _submitIV;
}
- (UILabel *)submitL {
    
    if (!_submitL) {
        
        _submitL = [[UILabel alloc] init];
        _submitL.text = @"提交";
        _submitL.textColor = WhiteColor;
        _submitL.textAlignment = NSTextAlignmentCenter;
        _submitL.font = Font(32);
        
    }
    
    return _submitL;
    
}

#pragma mark -设置
- (void)viewWillAppear:(BOOL)animated {
    
    [super viewWillAppear:animated];
    
    self.navigationController.navigationBar.hidden = NO;
//    self.tabBarController.tabBar.hidden = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
    
    [super viewWillDisappear:animated];
    
//    self.navigationController.navigationBar.hidden = NO;
//    self.tabBarController.tabBar.hidden = NO;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
